import 'package:flutter/material.dart';
import 'package:get/get.dart';

class MainController extends GetxController {
  var currentIndex = 0.obs;
  var pageController = PageController();

  MainController();

  void setCurrentIndex(int index) => currentIndex.value = index;

  void jumpToPage(int index) {
    pageController.animateToPage(index, duration: Duration(milliseconds: 500), curve: Curves.ease);
  }
}
